import {defineStore} from "pinia";
import {ref} from "vue";

export const storeSystemCertificateInfo = defineStore('storeSystemCertificateInfo', () => {
    const systemInfo = ref({
        "imgProxyPrefixUrl": '',
        lcuServerStatus: '',
    });

    function setSystemInfo(systemInfo) {
        systemInfo.value = systemInfo;
    }

    function setImgProxyPrefix(url) {
        systemInfo.value.imgProxyPrefixUrl = url;
    }

    function getImgProxyPrefix() {
        return systemInfo.value.imgProxyPrefixUrl;
    }

    function setLcuServerStatus(status) {
        systemInfo.value.lcuServerStatus = status;
    }


    return {
        systemInfo, setSystemInfo, setImgProxyPrefix, getImgProxyPrefix,
        setLcuServerStatus,
    }
})
